#include "StdAfx.h"
#include "Player.h"
#include "Command.h"
#include <sstream>
#include "ResourceManager.h"

Player::Player(void)
{
	CurrentLocation = 0;
}

Player::~Player(void)
{
}

void Player::Run()
{
	while (true)
	{
		ResourceManager* mng = ResourceManager::GetInstance();
		Location* loc = mng->GetLocation(CurrentLocation);
		CurrentCommand = Command::GetTypedCommand();
		loc->Parse(CurrentCommand);		
	}
}
Player* Player::PlayerOne = new Player();
Player* Player::GetInstance()
{
	return PlayerOne;
}

Location* Player::GetCurrentLocation()
{
	ResourceManager* mng = ResourceManager::GetInstance();
	return mng->GetLocation(CurrentLocation);
}
